@use "sass:math";
@import "~style/uca/index.scss";

.ux {
  &_table {

    // 最后一行滚动条
    .ant-table-scroll-horizontal {
      .ant-table-tbody {
        tr:last-child {
          .ant-table-cell {
            padding: $uni_font * 0.628 $uni_font $uni_font * 1.128 $uni_font;
          }
        }
      }
    }

    // ux_table_secondary
    &_secondary {
      .ant-table {
        table {
          padding: 0;

          td {
            padding: $uni_font * 0.6 12px;
          }

          th {
            padding: $uni_font * 0.8 12px;
          }
        }
      }
    }

    // ux_table_black
    &_black {
      .ant-table {
        table {
          th:hover {
            background-color: ghostwhite;
            opacity: 0.8;
            color: $uni_color;
          }
        }
      }
    }

    // ux_table_editor
    &_editor {
      &_op {
        min-width: 64px;
      }

      .ant-btn-group {
        button {
          margin-right: 0;
        }
      }

      .ant-table {
        table {
          padding: 0;

          td {
            padding: 3px 12px;
          }

          th {
            padding: 8px 12px;
          }

          input {
            min-height: 32px;
          }
        }
      }

      .ant-select-selection {
        min-width: 200px;
      }

      &_small {
        .ant-btn-group {
          min-height: 32px;
          height: 32px;

          button {
            margin-right: 0;
            margin-top: 0;
          }
        }

        .ant-table {
          table {
            padding: 0;

            td {
              padding: 3px 6px;
            }

            th {
              padding: 6px;
            }

            input {
              min-height: 32px;
            }
          }
        }

        .ant-select-selection {
          min-width: 200px;
        }
      }
    }

    // ux_table_tree 树型
    &_tree {

      .ant-table {
        table {
          padding: 0;

          td {
            padding: $uni_font * 0.6 12px;
          }

          th {
            padding: $uni_font * 0.8 12px;
          }
        }
      }

      .ant-table-expanded-row {

        .ant-table-thead {
          th {
            background-color: $uni_color;
            color: white;
            padding: $uni_font * 0.8 12px;
          }
        }

        td[colspan] {
          padding: $uni_font * 0.6 12px;
          min-height: 80px;
          max-height: 200px;
          overflow-y: auto;
        }
      }
    }

    // 文档管理
    &_doc {
      overflow-y: scroll;
    }

    // ux_table = .ant-table
    .ant-table {

      // Revert Color
      .ant-table-thead {
        // @include uca_table_head(true);

        .ant-table-cell {
          padding: $uni_font * 0.8 $uni_font;
        }
      }

      .ant-table-tbody {

        .ant-table-cell {
          padding: $uni_font * 0.628 $uni_font;

          a {
            color: $uni_color;

            &:hover {
              opacity: 0.8;
            }
          }
        }
      }
    }
  }
}